package com.tul.exercise.base.clazz.base.eg5;

/**
 * @author tul
 * 《java编程思想》 14章 示例6:cast语法
 *
 */
public class ClassCasts {



    public static void main(String[] args) {
        Building b = new House();

        Class<House> houeType = House.class;

        // 向下类型转换
        House h = houeType.cast(b);

        // 等价于：向下类型转换
        h = (House) b;
    }
}
